package compiler;

import static java.util.Collections.EMPTY_MAP;
import java.util.Map;
import language.LFunction;
import language.LType;

public interface Func {

    public LType accept(LType l, Map<Character, LType> vars);

    public static LFunction compose(Func f, Func g) {
        return LFunction.of(l -> g.accept(f.accept(l, EMPTY_MAP), EMPTY_MAP));
    }
}
